package com.sugar.queryinfo.module.business.controller.admin.dataquery.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.sugar.queryinfo.module.business.dal.dataobject.dataquerydtjd.DataQueryDtjdDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryfqz.DataQueryFqzDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryfyxq.DataQueryFyxqDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataquerylsbg.DataQueryLsbgDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryqjda.DataQueryQjdaDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryqjld.DataQueryQjldDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataquerytanzc.DataQueryTanzcDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataquerywdgz.DataQueryWdgzDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryxfhx.DataQueryXfhxDO;
import com.sugar.queryinfo.module.business.dal.dataobject.dataqueryzwsc.DataQueryZwscDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;

import static com.sugar.queryinfo.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 数据查询 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DataQueryRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13137")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30790")
    @ExcelProperty("用户ID")
    private Long userId;

    @Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28219")
    @ExcelProperty("部门ID")
    private Long deptId;

    @Schema(description = "校验方式（0.关闭校验 1. 二要素校验 2. 三要素校验）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("校验方式（0.关闭校验 1. 二要素校验 2. 三要素校验）")
    private Integer validMethod;

    @Schema(description = "查询姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("查询姓名")
    private String queryName;

    @Schema(description = "查询证件号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("查询证件号")
    private String queryIdCard;

    @Schema(description = "查询手机号")
    @ExcelProperty("查询手机号")
    private String queryMobile;

    @Schema(description = "查询类型（多个）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("查询类型（多个）")
    private List<String> queryType;

    @Schema(description = "查询时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("查询时间")
    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化（响应）
    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化（请求）
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime queryTime;

    @Schema(description = "验证结果（0未校验 1校验一致 2校验不一致）")
    @ExcelProperty("验证结果（0未校验 1校验一致 2校验不一致）")
    private Integer vaildResult;

    @Schema(description = "生日")
    @ExcelProperty("生日")
    private String validBirthday;

    @Schema(description = "地址")
    @ExcelProperty("地址")
    private String validAddress;

    @Schema(description = "城市类型（一-五线城市）", example = "2")
    @ExcelProperty("城市类型（一-五线城市）")
    private String validAddressType;

    @Schema(description = "星座")
    @ExcelProperty("星座")
    private String validConstellation;

    @Schema(description = "性别")
    @ExcelProperty("性别")
    private String validGender;

    @Schema(description = "年龄")
    @ExcelProperty("年龄")
    private String validAge;

    @Schema(description = "风险类型（1安全客户；2撸子；3疑似撸）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("风险类型（1安全客户；2撸子；3疑似撸）")
    private Integer riskType;

    @Schema(description = "风险记录（当客户撸子/疑似撸的时候，记录真假财务里的ID）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("风险记录（当客户撸子/疑似撸的时候，记录真假财务里的ID）")
    private List<Long> riskTypeFinanceIds;

    @Schema(description = "是否是智能审核（0否 1是）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("是否是智能审核（0否 1是）")
    private Boolean isAudit;

    @Schema(description = "智能审核-内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("智能审核-内容")
    private String autidContent;

    @Schema(description = "智能审核-是否加入黑名单（0否 1是）", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("智能审核-是否加入黑名单（0否 1是）")
    private Boolean auditIsBlacklist;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    /**
     * 探针C
     */
    private DataQueryTanzcDO tanzc;
    /**
     * 全景雷达
     */
    private DataQueryQjldDO qjld;
    /**
     * 全景档案
     */
    private DataQueryQjdaDO qjda;
    /**
     * 法院风险
     */
    private DataQueryFyxqDO fyfx;
    /**
     * 在网时长
     */
    private DataQueryZwscDO zwsc;

    /**
     * 流水报告
     */
    private DataQueryLsbgDO lsbg;

    /**
     * 司法报告
     */
    private DataQueryWdgzDO wdgz;

    /**
     * 逾期探查报告
     */
    private DataQueryFqzDO fqz;

    /**
     * 智查全景报告
     */
    private DataQueryXfhxDO xfhx;

    /**
     * TC报告
     */
    private DataQueryDtjdDO dtjd;

}
